package com.apexsoft.assets.base.model;


import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.util.Map;

@NoArgsConstructor
@AllArgsConstructor
public class TreeModel {
    private String id;
    private String fid;
    private Map<String,Object> data;

    public boolean IsChild(String id){
        if(id == null || this.fid == null){
            return false;
        }
        return id.equals(fid);
    }

    public String getId() {
        return id;
    }

    public TreeModel setId(String id) {
        this.id = id;
        return this;
    }

    public String getFid() {
        return fid;
    }

    public TreeModel setFid(String fid) {
        this.fid = fid;
        return this;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public TreeModel setData(Map<String, Object> data) {
        this.data = data;
        return this;
    }
}
